package org.example.exampreparationtreasure.service;

import org.example.exampreparationtreasure.enums.DifficultyLevel;
import org.example.exampreparationtreasure.enums.QuestionType;
import org.example.exampreparationtreasure.model.dto.QuestionQueryDTO;
import org.example.exampreparationtreasure.model.entity.Question;

import java.util.List;
import java.util.Map;

public interface QuestionService {
    Long create(Question question);
    boolean update(Question question);
    boolean delete(Long id);
    Question getById(Long id);
    List<Question> query(QuestionQueryDTO queryDTO);
    Long count(QuestionQueryDTO queryDTO);
    
    // 从QuestionsService合并的方法
    /**
     * 导出题目到Excel文件
     * @param categoryId 分类ID，可选
     * @param questionType 题目类型，可选
     * @param difficulty 难度等级，可选
     * @return Excel文件路径
     */
    String exportQuestionsToExcel(Long categoryId, QuestionType questionType, DifficultyLevel difficulty);
    
    /**
     * 批量导入题目
     * @param items 题目列表
     * @return 统计结果：total / success / failed
     */
    Map<String, Object> importQuestions(List<Question> items);
}


